<template>
	<div class="docpreview">
		<div style="height: 1000px" ref="docWrap"></div>
	</div>
</template>

<script>
import { renderAsync } from 'docx-preview'
import axios from 'axios'
import { getSignatures } from '@/api'
export default {
	props: {
		docUrl: String,
		businessId: String
	},
	data() {
		return {
			showForm: true,
			signForm: {},
			rules: {},

			signature: ''
		}
	},
	computed: {},
	mounted() {
		axios({
			url: this.docUrl,
			method: 'get',
			responseType: 'blob'
		}).then((res) => {
			const buffer = res.data
			renderAsync(buffer, this.$refs.docWrap)
		})
	},
	methods: {},
	components: {}
}
</script>

<style lang="scss" scoped="scoped">
.button {
	position: fixed;
	bottom: 10px;
	left: 0;
	right: 0;
	text-align: center;
}
</style>
